/**
 * Created by ch-hui on 15/12/20.
 */
$(function(){


    $('.dataTables-example').dataTable({
        "bSort":false
    });

    /**
     * 新增原料
     */
    $("button[name=add]").bind("click",function(){
        location.href = BASE + "/material/add"
    });





    /**
     * 以下是Form脚本
     */

    $("button[name=backButton]").bind("click",function(){
        location.href = BASE + "/material"
    });


    var editView = $("input[name=supplyId]").val();
    if(editView){
        // 编辑页面不允许修改CFN
        $("input[name=contact_person]").attr("disabled",true);
    }




});


function add(material, quantity){
    $("h4").html("本次" + material + "入库量");
    $("input[name=stockQuantity]").val(quantity);
}